﻿using Max.PH4_2102A.Shopping.Domain;
using Microsoft.EntityFrameworkCore;

namespace Max.PH4_2102A.Shopping.DAL
{
    /// <summary>
    /// 
    /// </summary>
    public class EFCoreHelper : DbContext
    {
        public EFCoreHelper(DbContextOptions<EFCoreHelper> options) : base(options) { }

        /// <summary>
        /// 系统用户
        /// </summary>
        public virtual DbSet<UserModel> Users { get; set; }

        #region 20230722 品牌分类

        /// <summary>
        /// 品牌
        /// </summary>
        public virtual DbSet<BrandModel> Brands { get; set; }

        /// <summary>
        /// 分类
        /// </summary>
        public virtual DbSet<CategoryModel> Categories { get; set; }

        /// <summary>
        /// 品牌分类
        /// </summary>
        public virtual DbSet<BrandCategoryModel> BrandCategories { get; set; }


        #endregion

        #region 20230725 产品sku和spu

        //------------------------奥迪A8
        /// <summary>
        /// 产品（相当于一个概念）  
        /// </summary>
        public virtual DbSet<SPUModel> SPUs { get; set; }

        //-----------------------有高配、低配、中配
        /// <summary>
        /// 产品的规格（这款产品有哪些规格）
        /// </summary>
        public virtual DbSet<SPUSpecModel> SPUSpecs { get; set; }

        //------------------------具体的配置
        /// <summary>
        /// 具体的产品（是有具体的配置。因为有具体的规格，所有价格、库存都不同）
        /// </summary>
        public virtual DbSet<SKUModel> SKUs { get; set; }


        /// <summary>
        /// 每一款（sku）的图片
        /// </summary>
        public virtual DbSet<SKUImageModel> SKUImages { get; set; }



        #endregion

        #region 20230731 订单主表和订单明细表
        public virtual DbSet<OrderMasterEntity> OrderMasters { get; set; }
        public virtual DbSet<OrderDetailEntity> OrderDetails { get; set; }

        //订单退货退款
        public virtual DbSet<OrderBackMasterProduct> OrderBackMasters { get; set; }
        #endregion

        #region 物流
        public virtual DbSet<LogisticMasterEntity>  LogisticMasters { get; set; }
        public virtual DbSet<LogisticDetailEntity> LogisticDetails { get; set; }


        #endregion
    }
}